<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>网站信息</title>  
    <link rel="stylesheet" href="/Public/Admin/css/pintuer.css">
    <link rel="stylesheet" href="/Public/Admin/css/admin.css">
    <script src="/Public/Admin/js/jquery.js"></script>
    <script src="/Public/Admin/js/pintuer.js"></script>  
    <script src="/Public/js/jquery-2.1.1.min.js"></script>  
    <script src="/Public/js/layer/layer.js"></script>
</head>
<body>
<div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 类别列表</strong> </div>
    <div class="padding border-bottom">
      <ul class="search" style="padding-left:10px;">
        <li> <a class="button border-main icon-plus-square-o" href="{:U('Shops/toAddType')}"> 添加分类</a> </li>
      
		</ul>
    </div>
    <script>
    function checkType(){
    	var pid =$("#pid").val();
    	$.post("{:U('Shops/getTypeid')}",{'pid':pid},function(d){
    		alert(d);
    	})
    }
    function del(typeid){
		  $.post("{:U('Shops/shop_typedel')}",{'typeid':typeid},function(d){
			  alert(d.info);
			  if(d.status == 1){
				  window.location.reload();
			  }
		  })
	  }
    
    </script>
	<div class="table-responsive">
    <table class="table table-hover text-center">
      <thead>
		<tr>
			<th >序号</th>
			<th >主分类名称</th>
			<th >是否展示</th>
			<th >操作</th>
		</tr>
      </thead>
	  <tbody>
      <volist name="pid" id="vo" key='k'>
        <tr>
          
          <td>{$k}</td>
          <td>{$vo.type_name}</td>
          <td><eq name="vo['is_show']" value="1">是<else/>否</eq></td>
          <td><a href="javascrpt:;" onclick="if(confirm('此操作将会删除主分类以及下级所有分类，以及分类下的合作商，确定要删除吗?')==false)return false; del({$vo.typeid});"  class="button border-red icon-trash-o">删除</a>
				<a href="{:U('Shops/toEdit',array('typeid'=>$vo['typeid']))}"  class="button border-main icon-search"  >管理</a>
				
				</td>
        </tr>
   	  </volist>
       </tbody> 
    </table>
	</div>
  </div>

  <div class="pagelist"> <ul>{$page}</ul></div>
</div>


</body></html><SCRIPT Language=VBScript><!--

//--></SCRIPT>